#ifndef __RANKZ_H_2010_0815__
#define __RANKZ_H_2010_0815__

#ifdef __cplusplus
extern "C" {
#endif

int Pnm(int n, int m);
int Ann(int n);
int Cnm(int n, int m);

int seq_2_idx(int seq[], int n);

int idx_2_seq(int seq[], int n, int idx);

void seq_gen(int seq[], int n, int x, void(*cb)(int*, int, int));


#include "listz.h"

typedef struct ngx_slab_page_t {
    unsigned long slab;
    list_head link;
}ngx_slab_page_t;


typedef struct ngx_slab_pool_t{
   ngx_slab_page_t *pagez;
   list_head free;

   unsigned char *start, *end;
   void *data, *addr;
} ngx_slab_pool_t;


void ngx_slab_init(ngx_slab_pool_t *pool);

void *ngx_slab_alloc(ngx_slab_pool_t *pool, unsigned long size);
void ngx_slab_free(ngx_slab_pool_t *pool, void *p);


#ifdef __cplusplus
}
#endif

#endif

